package com.ruoyi.littleRedBook.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.littleRedBook.domain.pojo.Review;
import org.apache.ibatis.annotations.Param;

public interface ReviewMapper extends BaseMapper<Review> {
    // 按订单ID查询评价
    Review selectByOrderId(@Param("orderId") Long orderId);

    // 按商品ID和评价人ID查询评价（可选扩展）
    Review selectByProductIdAndReviewerId(@Param("productId") Long productId,
                                          @Param("reviewerId") Long reviewerId);
}
